import Vue from 'vue';
import VueRouter from 'vue-router';
import index from '../views/index.vue'
import login from '../views/account/login.vue';
Vue.use(VueRouter)

const routes = [
	// 主页
	{
		path: '/',
		name: 'index',
		component: index
	},
	// 登录
	{
		path: '/account/login',
		name: 'login',
		component: login
	},
	// 忘记密码
	{
		path: '/account/forgot',
		name: 'forgot',
		component: () => import('../views/account/forgot.vue')
	},
	// 注册账号
	{
		path: '/account/register',
		name: 'register',
		component: () => import('../views/account/register.vue')
	},
		// 媒体图片
	{
		path: '/media/image',
		name: 'media_image',
		component: () => import('../views/media/image.vue')
	},
	// 音乐
	{
		path: '/media/music',
		name: 'media_music',
		component: () => import('../views/media/music.vue')
	},
	// 媒体视频
	{
		path: '/media/video',
		name: 'media_video',
		component: () => import('../views/media/video.vue')
	},
	// 媒体视频
	{
		path: '/user_center/index',
		name: 'user_center_index',
		component: () => import('../views/user_center/index.vue')
	},
	// 文章路由
	{
		path: '/article/list',
		name: 'article_list',
		component: () => import('../views/article/list.vue')
	},
	{
		path: '/article/details',
		name: 'article_details',
		component: () => import('../views/article/details.vue')
	},
	// 浏览网站
	// 收藏路由
	{
		path: '/user/collect',
		name: 'collect_list',
		component: () => import('../views/user/collect.vue')
	},


	{
		path: '/comment/table',
		name: 'comment_table',
		component: () => import('../views/comment/table.vue')
	},
	{
		path: '/comment/view',
		name: 'comment_view',
		component: () => import('../views/comment/view.vue')
	},

	



	// 公告路由
	{
		path: '/notice/list',
		name: 'notice_list',
		component: () => import('../views/notice/list.vue')
	},
	{
		path: '/notice/details',
		name: 'notice_details',
		component: () => import('../views/notice/details.vue')
	},
	// 普通用户表格路由
	{
		path: '/ordinary_users/table',
		name: '/ordinary_users_table',
		component: () => import('../views/ordinary_users/table.vue')
	},
	// 普通用户详情路由
	{
		path: '/ordinary_users/view',
		name: '/ordinary_users_view',
		component: () => import('../views/ordinary_users/view.vue')
	},
	
	
		
		
		
	// 商家用户表格路由
	{
		path: '/merchant_users/table',
		name: '/merchant_users_table',
		component: () => import('../views/merchant_users/table.vue')
	},
	// 商家用户详情路由
	{
		path: '/merchant_users/view',
		name: '/merchant_users_view',
		component: () => import('../views/merchant_users/view.vue')
	},
	
	
		
		
		
	// 员工用户表格路由
	{
		path: '/employee_user/table',
		name: '/employee_user_table',
		component: () => import('../views/employee_user/table.vue')
	},
	// 员工用户详情路由
	{
		path: '/employee_user/view',
		name: '/employee_user_view',
		component: () => import('../views/employee_user/view.vue')
	},
	
	
		
		
		
	// 房间打扫表格路由
	{
		path: '/room_cleaning/table',
		name: '/room_cleaning_table',
		component: () => import('../views/room_cleaning/table.vue')
	},
	// 房间打扫详情路由
	{
		path: '/room_cleaning/view',
		name: '/room_cleaning_view',
		component: () => import('../views/room_cleaning/view.vue')
	},
	
	
		
		
		
	// 地区名称表格路由
	{
		path: '/region_name/table',
		name: '/region_name_table',
		component: () => import('../views/region_name/table.vue')
	},
	// 地区名称详情路由
	{
		path: '/region_name/view',
		name: '/region_name_view',
		component: () => import('../views/region_name/view.vue')
	},
	
	
		
		
		
	// 热门景点表格路由
	{
		path: '/popular_attractions/table',
		name: '/popular_attractions_table',
		component: () => import('../views/popular_attractions/table.vue')
	},
	// 热门景点详情路由
	{
		path: '/popular_attractions/view',
		name: '/popular_attractions_view',
		component: () => import('../views/popular_attractions/view.vue')
	},
	
		// 热门景点列表路由
	{
		path: '/popular_attractions/list',
		name: '/popular_attractions_list',
		component: () => import('../views/popular_attractions/list.vue')
	},
	
		// 热门景点详情路由
	{
		path: '/popular_attractions/details',
		name: '/popular_attractions_details',
		component: () => import('../views/popular_attractions/details.vue')
	},
		
		
		
	// 民宿信息表格路由
	{
		path: '/homestay_information/table',
		name: '/homestay_information_table',
		component: () => import('../views/homestay_information/table.vue')
	},
	// 民宿信息详情路由
	{
		path: '/homestay_information/view',
		name: '/homestay_information_view',
		component: () => import('../views/homestay_information/view.vue')
	},
	
		// 民宿信息列表路由
	{
		path: '/homestay_information/list',
		name: '/homestay_information_list',
		component: () => import('../views/homestay_information/list.vue')
	},
	
		// 民宿信息详情路由
	{
		path: '/homestay_information/details',
		name: '/homestay_information_details',
		component: () => import('../views/homestay_information/details.vue')
	},
		
		
		
	// 民宿订单表格路由
	{
		path: '/homestay_orders/table',
		name: '/homestay_orders_table',
		component: () => import('../views/homestay_orders/table.vue')
	},
	// 民宿订单详情路由
	{
		path: '/homestay_orders/view',
		name: '/homestay_orders_view',
		component: () => import('../views/homestay_orders/view.vue')
	},
		// 民宿订单添加路由
	{
		path: '/homestay_orders/edit',
		name: '/homestay_orders_edit',
		component: () => import('../views/homestay_orders/edit.vue')
	},
	
	
		
		
		
	// 取消订单表格路由
	{
		path: '/cancellation_of_order/table',
		name: '/cancellation_of_order_table',
		component: () => import('../views/cancellation_of_order/table.vue')
	},
	// 取消订单详情路由
	{
		path: '/cancellation_of_order/view',
		name: '/cancellation_of_order_view',
		component: () => import('../views/cancellation_of_order/view.vue')
	},
	
	
		
		
		
	// 续房订单表格路由
	{
		path: '/renewal_order/table',
		name: '/renewal_order_table',
		component: () => import('../views/renewal_order/table.vue')
	},
	// 续房订单详情路由
	{
		path: '/renewal_order/view',
		name: '/renewal_order_view',
		component: () => import('../views/renewal_order/view.vue')
	},
	
	
		
		
		
	// 用户评价表格路由
	{
		path: '/user_evaluate/table',
		name: '/user_evaluate_table',
		component: () => import('../views/user_evaluate/table.vue')
	},
	// 用户评价详情路由
	{
		path: '/user_evaluate/view',
		name: '/user_evaluate_view',
		component: () => import('../views/user_evaluate/view.vue')
	},
	
	
		
		
		
	// 民宿餐饮表格路由
	{
		path: '/homestay_and_catering/table',
		name: '/homestay_and_catering_table',
		component: () => import('../views/homestay_and_catering/table.vue')
	},
	// 民宿餐饮详情路由
	{
		path: '/homestay_and_catering/view',
		name: '/homestay_and_catering_view',
		component: () => import('../views/homestay_and_catering/view.vue')
	},
	
		// 民宿餐饮列表路由
	{
		path: '/homestay_and_catering/list',
		name: '/homestay_and_catering_list',
		component: () => import('../views/homestay_and_catering/list.vue')
	},
	
		// 民宿餐饮详情路由
	{
		path: '/homestay_and_catering/details',
		name: '/homestay_and_catering_details',
		component: () => import('../views/homestay_and_catering/details.vue')
	},
		
		
		
	// 商家账单表格路由
	{
		path: '/merchant_billing/table',
		name: '/merchant_billing_table',
		component: () => import('../views/merchant_billing/table.vue')
	},
	// 商家账单详情路由
	{
		path: '/merchant_billing/view',
		name: '/merchant_billing_view',
		component: () => import('../views/merchant_billing/view.vue')
	},
	
	
		
		
		
	// 餐饮订单表格路由
	{
		path: '/catering_orders/table',
		name: '/catering_orders_table',
		component: () => import('../views/catering_orders/table.vue')
	},
	// 餐饮订单详情路由
	{
		path: '/catering_orders/view',
		name: '/catering_orders_view',
		component: () => import('../views/catering_orders/view.vue')
	},
		// 餐饮订单添加路由
	{
		path: '/catering_orders/edit',
		name: '/catering_orders_edit',
		component: () => import('../views/catering_orders/edit.vue')
	},
	
	
		
		
		

	// 用户路由
	{
		path: '/user/index',
		name: 'user_index',
		component: () => import('../views/user/index.vue')
	},
	// 基本信息
	{
		path: '/user/info',
		name: 'user_info',
		component: () => import('../views/user/info.vue')
	},
	// 找回密码
	{
		path: '/user/password',
		name: 'user_password',
		component: () => import('../views/user/password.vue')
	},

	// 搜索
	{
		path: '/search',
		name: 'search',
		component: () => import('../views/search/index.vue')
	},
	// 局部搜索
	{
		path: '/search/details',
		name: 'search_details',
		component: () => import('../views/search/details.vue')
	}
]

const router = new VueRouter({
	mode: 'hash',
	base: process.env.BASE_URL,
	routes
})

router.afterEach((to, from, next) => {
	let title = "在线民宿预定管理系统-home";
	document.title = title;
	document.logo = "在线民宿预定管理系统"
})

export default router
